Andrew D'Alessio's profile

Dynamic NPC Scaling System

Part 1 - Details

Asset Name: Dynamic (Non-Player Character) N.P.C. Scaling System

Description: This concept was a prototype for a system designed to control the world and its inhabitants around a player. The basic functionality of the system is thus, the N.P.C's would have a level associated with them. This level would be determined based off of the NPC_MGT() function in the second image. From this level selection it would control how the NPC's level with respects to the player, ensuring each entity encountered was at an appropriate level of difficulty.

Tools: Unreal Engine 5.0 Early Access, Microsoft Visual Studio - 2019 Community.

Skills: C++ & Blueprint node code development within Unreal Engine's work flow. Event-Driven delegate system, built around player based actions.

Part 2 - Reflection

The process for creating this artifact, was a two part processes, with part one, understanding what exactly I wanted to accomplish, and researching a similar asset; with part two being iterative development and testing of my idea, until it represented a working asset. The polishing for this artifact came through the testing phase. After I developed the asset, I put myself in as many possible scenarios, where I attempted to break the asset, by performing various functions or actions, that would attempt to push my system to its limit or logical failure.

One of the biggest things I learned while developing this asset, was how to create a more event driven system, that relied upon data input versus having each of the respective functions operate on the server tick. With this learning curve, came my biggest challenge, controlling the level of scaling and behavior from the NPC function. I discovered that initially, I had to lower the scalar variable values down to below 0.025, in order to control how the NPC health and resource values scaled at levels above 10.

On the grounds of feedback, I would take the suggestions or considerations of those who viewed it and attempt to apply this concept to what I was currently working on. For example, when originally working on how the NPC's health was controlled, I started with a smaller base amount, and only applied a 2.5% increase to its health every level, versus a 25% increase, as this scaled wildly out of control at later levels.

Finally, the artifact was improved over the course of many different failures and different levels. Every time, I would get to a point where I believed the scaling system was functioning, I would add a new set of levels or ways in which a level could be obtained to discover the system did not function as intended. This lead me to, at a very late stage in development, to re-work the system on a small level, to initialize the NPC and then obtain the player data, after the player had been loaded, and this in turn controlled how the visual system was able to display the NPC's data, as it snapshots on game load, and this data would always reflect the scaled information before the player level of obtained.

Dynamic NPC Scaling System
Published:

Dynamic NPC Scaling System

Published: